package com.aldobucchi.hierarchy
{
	import com.aldobucchi.hierarchy.rel.Above;
	import com.aldobucchi.hierarchy.rel.Below;
	import com.aldobucchi.hierarchy.rel.Equivalent;
	import com.aldobucchi.hierarchy.rel.Higher;
	import com.aldobucchi.hierarchy.rel.Lower;
	import com.aldobucchi.hierarchy.rel.None;
	import com.aldobucchi.utils.AbstractTest;



	/**
	 * 
	 * @private
	 * 
	 * @author aldo.bucchi@gmail.com
	 * 
	 */
	public class SimpleHierarchicalConceptTest extends AbstractTest
	{


		private var a:SimpleHierarchicalConcept = new SimpleHierarchicalConcept( "a" );
		private var aa:SimpleHierarchicalConcept = new SimpleHierarchicalConcept( "aa" );
		private var aaa:SimpleHierarchicalConcept = new SimpleHierarchicalConcept( "aaa" );
	
		private var b:SimpleHierarchicalConcept = new SimpleHierarchicalConcept( "b" );
		private var bb:SimpleHierarchicalConcept = new SimpleHierarchicalConcept( "bb" );
		private var bbb:SimpleHierarchicalConcept = new SimpleHierarchicalConcept( "bbb" );


	
		public function test_getHierarchicalRelation( ):void
		{

			assertTrue( a.getHierarchicalRelation( aa ) is Below );
			assertTrue( a.getHierarchicalRelation( aa ) is Lower );

			assertTrue( a.getHierarchicalRelation( aaa ) is Lower );

			assertTrue( aaa.getHierarchicalRelation( a ) is Higher );

			assertTrue( aaa.getHierarchicalRelation( aa ) is Higher );
			assertTrue( aaa.getHierarchicalRelation( aa ) is Above );



			assertTrue( aaa.getHierarchicalRelation( aaa ) is Equivalent );

			assertTrue( a.getHierarchicalRelation( b ) is None );
			
		}


		
	}
	
	
}